%module graph_core
%{
#include "graph.h"
#include "graphd.h"
#include "algorithm_graphd.h"
%}

%include "std_string.i"
%include "std_vector.i"
%include "std_set.i"
%include "std_pair.i"
%include "exception.i"
namespace std {
        %template(vectorInt) std::vector<int>;
        %template(vectorString) std::vector<std::string>;
        %template(setInt) std::set<int>;
        %template(vectorPairStrInt) std::vector<std::pair<int, std::string>>;
};

%exception {
    try {
        $action
    } catch (const std::exception& e) {
        SWIG_exception(SWIG_RuntimeError, e.what());
    }
}
//%rename($ignore, %$isclass) ""; // Only ignore all classes
//%rename("%s") Node;
//%rename("%s") UndirectedGraph;

%include "graph.h"
%include "graphd.h"
%include "basic.h"
%include "algorithm_graphd.h"
//%include "algorithm_graph.h"

%template(PUndirectedGraph) TPt<UndirectedGraph>;
%template(PDirectedGraph) TPt<DirectedGraph>;

%ignore Node::Node;
%ignore UndirectedGraph::UndirectedGraph;
%ignore DirectedGraph::DirectedGraph;
%ignore CRef;